//package ai;
//
//import ai.people.netmon.MsgSearchServiceApplication;
//import ai.people.netmon.msgsearch.service.MessageSearchService;
//import ai.people.netmon.msgsearch.service.test.CountEs;
//import org.junit.jupiter.api.Test;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//
//import java.io.FileWriter;
//import java.io.IOException;
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//
///**
// * @author yuanqinglong
// * @date 2022/1/20 16:50
// */
//@SpringBootTest(classes = MsgSearchServiceApplication.class)
//public class test {
//
//
//    @Autowired
//    private CountEs countEs;
//
//    @Autowired
//    private MessageSearchService messageSearchService;
//
//
//    static DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'+0800'");
//    //static LocalDateTime endNow = LocalDateTime.of(2022, 1, 17, 0, 0, 0);
//    //static LocalDateTime startNow = LocalDateTime.of(2021, 6, 1, 0, 0, 0);
//    static LocalDateTime endNow = LocalDateTime.of(2022, 1, 25, 0, 0, 0);
//    //static LocalDateTime startNow = endNow.minusMonths(1);
//    static LocalDateTime startNow = endNow.minusDays(1);
//
//    @Test
//    public void test() throws IOException {
//        FileWriter fileWriter = new FileWriter("D:\\files\\count对比-2021-01-01~2021-01-07.txt");
//        FileWriter fileWriter0 = new FileWriter("D:\\files\\count0-2020-05~2022-01.txt");
//        //LocalDateTime localDateTime;
//        for (; ; ) {
//            if (endNow.equals(startNow)) {
//                break;
//            }
//            startNow = countEs.syncSearchByScroll1(startNow, fileWriter, fileWriter0);
//
//        }
//        fileWriter.close();
//        fileWriter0.close();
//
//    }
//
//
//}
